As the process of integrated circuits (ICs) shrinks to very deep submicron levels, the complexity and cost of IC fabrication increases significantly. Only a few companies can afford maintaining an entire supply chain from design to fabrication. Almost all design houses have become fabless. IC products are fabricated in third party foundries to lower costs, which can provide attackers with opportunities to make malicious inclusions and alterations, known as hardware Trojans. Hardware Trojans have become a serious problem for security-critical applications, because they may cause malfunctions, lower the reliability of ICs, leak confidential information to adversaries or even destroy a system under certain conditions. Trojans can be inserted into a design at any phase from circuit design to circuit fabrication. These and other shortcomings are addressed in the present disclosure.